<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>WidgetButtons Manual Test</title>
</head>
<body>

    <div id="awesome-widget">
        <div class="yui3-widget-hd">
            <h2>Awesome Widget</h2>
            <span class="yui3-widget-buttons">
                <button class="yui3-button" name="foo">Foo</button>
            </span>
        </div>
    </div>

    <script src="../../../../build/yui/yui.js"></script>
    <script>
    YUI({filter: 'raw'}).use('base-build', 'widget', 'widget-buttons', function (Y) {
        Y.TestWidget = Y.Base.create('testWidget', Y.Widget, [Y.WidgetStdMod, Y.WidgetButtons], {
            BUTTONS: {
                foo: {
                    label: 'Baz',
                    action: function () {
                        alert('yay!');
                    }
                }
            }
        });

        var testWidget = new Y.TestWidget({
            srcNode: '#awesome-widget',
            render : true
        });

        // testWidget.getButton('foo').set('text', 'Bar');
        testWidget.addButton({label: 'Eric'}, 'header', 0);
    });
    </script>
</body>
</html>
